There is a technology for compressing scan data obtained by reading documents. In this technology, in a case where a read mode is an auto mode, a predetermined analyzing process is performed, whereby the kinds of documents are determined. Further, compressing schemes depending on the kinds of documents determined are used to compress scan data.